<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>

<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
  <div class="bs-left-container  clearfix"> 
    <!--{template left}--> 
  </div>
  <div class="left-drager">
    <div class="left-drager-op">
      <div class="left-drager-sub"></div>
    </div>
  </div>
  <div class="bs-main-container  clearfix">
    <div class="main-header clearfix"> 
      <ul class="nav nav-pills nav-pills-bottomguide"  >
        <li> <a href="{BASESCRIPT}?mod=cloud&op=edit&bz=dzz"> {lang set}</a> </li>
        <li> <a href="{BASESCRIPT}?mod=cloud&op=router">{lang routing_management}</a> </li>
        <li class="active"> <a href="{BASESCRIPT}?mod=cloud&op=rootedit">{lang add_routing}</a> </li>
      </ul>
    </div>
    <div class="main-content" style="padding:15px;border-top:1px solid #FFF">
      <form id="cpform" action="{BASESCRIPT}?mod=cloud&op=routeredit" class="form-horizontal form-horizontal-left" method="post" name="cpform">
        <input type="hidden" value="{FORMHASH}" name="formhash">
        <input type="hidden" name="routerid" value="$routerid">
        <input type="hidden" value="addroutersubmit" name="true">
        <dl>
          <dt>{lang routing_name}:</dt>
          <dd class="clearfix">
            <input type="text" name="router[name]" class="form-control" value="$router[name]">
          </dd>
        </dl>
        <dl>
          <dt>{lang priority}:</dt>
          <dd class="clearfix">
            <input type="text" name="router[priority]" class="form-control" value="$router[priority]">
          </dd>
        </dl>
        <dl>
          <dt>{lang storage_location}:</dt>
          <dd class="clearfix">
            <select name="router[remoteid]" class="form-control">
              <!--{loop $spaces $value}--> 
              <option value="$value[remoteid]" <!--{if $router[remoteid]==$value[remoteid]}-->selected="selected"<!--{/if}-->> $value[name]
								<!--{if $value[available]<1}-->（{lang router_routing_failure}）<!--{/if}-->
              </option>
              <!--{/loop}-->
            </select>
            <ul class="help-block ">
              <li>{lang cloud_movetool_designator_text}</li>
            </ul>
          </dd>
        </dl>
        <dl>
          <dt>{lang file_type}:</dt>
          <dd class="clearfix">
            <textarea type="textarea" id="exts" class="form-control" name="router[router][exts]" row="6" cols="6" style="width:300px;height:60px">{eval echo implode(',',$router[router][exts])}</textarea>
          </dd>
          <dd class="clearfix mt10"> 
          	<a href="javascript:;" onclick="setExts('jpg,jpeg,png,gif')">{lang photograph_class}</a> 
            &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('doc,docx,rtf,odt,htm,html,txt')">word{lang type_attach}</a> 
            &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('xls,xlsx,ods,sxc,csv,tsv')">excel{lang type_attach}</a> 
            &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('ppt,pptx,pps,ppsx,odp,sxi')">ppt{lang type_attach}</a> 
            &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('mp4,avi,wmv,mkv,rmvb,rm,asf,mpg,mpeg,mov')">{lang video_typename_attach}</a> &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('txt,ini,conf,log,bat,sql,js,css,htm,html,xml,asp,aspx,php,jsp,json,py,h,c')">{lang text_class}</a> 
          </dd>
          <dd class="clearfix mt10">
            <ul class="help-inline ">
              {lang cloud_movetool_file_type_text}
            </ul>
          </dd>
        </dl>
        <dl>
          <dt>{lang file_size}:</dt>
          <dd class="clearfix ">
            <div class="input-group pull-left" style="width:100px"> <span class="input-group-addon">{lang typename_attach_lt}</span>
              <input type="text" class="form-control" name="router[router][size][lt]" style="width:60px;" value="$router[router][size][lt]" />
              <span class="input-group-addon">M</span> </div>
            <div class="pull-left ml20 mr20" style="line-height:30px;"> AND</div>
            <div class="input-group pull-left" style="width:100px"> <span class="input-group-addon">{lang typename_attach_gt}</span>
              <input type="text" class="form-control" name="router[router][size][gt]" value="$router[router][size][gt]" style="width:60px;" />
              <span class="input-group-addon">M</span> </div>
          </dd>
          <dd class="clearfix ">
            <ul class="help-block ">
              {lang cloud_movetool_file_size_text}
            </ul>
          </dd>
        </dl>
        <input class="btn btn-primary" name="addroutersubmit" value="<!--{if $routerid}-->{lang edit}<!--{else}-->{lang add}<!--{/if}-->" type="submit">
      </form>
    </div>
  </div>
</div>
<script type="text/javascript">
	jQuery('.left-drager').leftDrager_layout();
	function setExts(str) {
		var old = trim(document.getElementById('exts').value).replace(/，{1,}/g, ',').replace(/,{1,}/g, ',').replace(/^\,/g, '');
		var arr = old ? old.split(',') : [];
		var newarr = str.split(',');
		for(var i = 0; i < newarr.length; i++) {
			if(jQuery.inArray(newarr[i], arr) < 0) {
				arr.push(newarr[i]);
			}
		}
		document.getElementById('exts').value = arr.join(',');
	}
</script> 
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/footer_simple}-->